home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / os2 / playlist.zip / install.CMD next >
OS/2 REXX Batch file  |  1996-06-03  |  1KB  |  43 lines

  1. /* Rexx utility to add the playlist icon to the desktop */
  2.  
  3.  cmdname ='install.CMD'
  4.  progname = 'playlist.exe'
  5.  DllName = 'VROBJ.DLL'
  6.  
  7.  If RxFuncQuery('SysLoadFuncs') <> 0 Then Do
  8.    Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
  9.    Call SysLoadFuncs
  10.    End
  11.  
  12. /* Attempt to copy Dll to \os2\dll */
  13. copy 'vrobj.dll \os2\dll'
  14.  
  15. /* Get path  */
  16.  Parse Upper Source . . path
  17.  path = Left(path,Lastpos('\',path))
  18.  
  19. /* Must be in same dir    */
  20.  program = path || progname
  21.  If Stream( program, 'C', 'QUERY EXISTS') = '' then do
  22.    Say ''
  23.    Say 'This utility must be in the same directory as' progname
  24.    Exit 1
  25.    end
  26.  
  27. /* Set up Playlist object */
  28.  class = 'WPProgram'
  29.  title = 'Playlist 2.0'
  30.  location = '<WP_DESKTOP>'
  31.  setup = 'ObjectID=<PLAYLIST>;ExeName=' || program || ';ProgType=PM;'
  32.  option = 'UPDATE'
  33.  rc = SysCreateObject( class, title, location, setup, option)
  34.  If rc = 0 then do
  35.    Say ''
  36.    Say 'Error.  Unable to create Playlist program object.'
  37.    Exit 1
  38.    end
  39.  
  40.  Say 'Playlist object has been placed on your Desktop.'
  41.  Say 'Double-click on the icon to start the program.'
  42.  Exit
  43.